<?php echo $this->tag->form(array()); ?>
<div class="center-block text-center">
    <div id="image-block">
        <?php if ($image) { ?>
        <?php echo $this->tag->image(array($image->url, 'class' => 'img-responsive question-img', 'id' => 'question-img')); ?>
        <?php } ?>
    </div>
    <div id="document-block">
        <?php if ($document) { ?>
        <div id="document-content" data-id="<?php echo $document->id; ?>">
            <?php if ($document->part > 4) { ?>
            <?php echo $document->content; ?>
            <?php } ?>
        </div>
        <?php } ?>
    </div>
    <div id="audio-block">
        <?php if ($audio) { ?>
        <button class="btn" data-url="<?php echo $audio->url; ?>" id="listen"><i class="fa fa-music"></i></button>
        <?php } ?>
    </div>
    <div id="question-block">
        <?php foreach ($questions as $question) { ?>
        <div class="question-number" data-id="<?php echo $question['id']; ?>"><?php echo 'Câu ' . $question['id']; ?></div>
        <?php if ($question['question']) { ?>
        <div>Question: <?php echo $question['question']; ?></div>
        <?php } ?>
        <?php if ($question['a']) { ?>
        <div><input name="answer[<?php echo $question['id']; ?>]" id="answera<?php echo $question['id']; ?>" type="radio"  value="A"/>A: <?php echo $question['a']; ?></div>
        <?php } ?>
        <?php if ($question['b']) { ?>
        <div><input name="answer[<?php echo $question['id']; ?>]" id="answerb<?php echo $question['id']; ?>" type="radio" value="B"/>B: <?php echo $question['b']; ?></div>
        <?php } ?>
        <?php if ($question['c']) { ?>
        <div><input name="answer[<?php echo $question['id']; ?>]" id="answerc<?php echo $question['id']; ?>" type="radio" value="C"/>C: <?php echo $question['c']; ?></div>
        <?php } ?>
        <?php if ($question['d']) { ?>
        <div><input name="answer[<?php echo $question['id']; ?>]" id="answerd<?php echo $question['id']; ?>" type="radio" value="D"/>D: <?php echo $question['d']; ?></div>
        <?php } ?>
        <?php } ?>
    </div>
    <button name="check" id="btn-check" type="button" class="btn btn-success"><i class="fa fa-check"></i></button>
    <button name="submit" class="btn"><i class="fa fa-arrow-right"></i></button>

    <div class="fb-comments" data-href="<?php echo 'http://localhost' . $this->url->get('practice/' . $qtsStr); ?>" data-numposts="5" data-colorscheme="light"></div>
</div>
<?php echo $this->tag->endform(); ?>

<?php echo $this->tag->javascriptInclude('js/soundjs/soundjs-0.5.2.min.js'); ?>
<?php echo $this->tag->javascriptInclude('js/exercise.js'); ?>